// Code generated by go-swagger; DO NOT EDIT.

package act_notification_api_service

// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

import (
	"github.com/go-openapi/runtime"
	"github.com/go-openapi/strfmt"
)

// New creates a new act notification api service API client.
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService {
	return &Client{transport: transport, formats: formats}
}

/*
Client for act notification api service API
*/
type Client struct {
	transport runtime.ClientTransport
	formats   strfmt.Registry
}

// ClientOption is the option for Client methods
type ClientOption func(*runtime.ClientOperation)

// ClientService is the interface for Client methods
type ClientService interface {
	ActNotificationAPIServiceAckNotification(params *ActNotificationAPIServiceAckNotificationParams, opts ...ClientOption) (*ActNotificationAPIServiceAckNotificationOK, error)

	ActNotificationAPIServiceGetNotification(params *ActNotificationAPIServiceGetNotificationParams, opts ...ClientOption) (*ActNotificationAPIServiceGetNotificationOK, error)

	ActNotificationAPIServiceSendNotificationV1(params *ActNotificationAPIServiceSendNotificationV1Params, opts ...ClientOption) (*ActNotificationAPIServiceSendNotificationV1OK, error)

	ActNotificationAPIServiceSubscribeNotification(params *ActNotificationAPIServiceSubscribeNotificationParams, opts ...ClientOption) (*ActNotificationAPIServiceSubscribeNotificationOK, error)

	SetTransport(transport runtime.ClientTransport)
}

/*
ActNotificationAPIServiceAckNotification act notification Api service ack notification API
*/
func (a *Client) ActNotificationAPIServiceAckNotification(params *ActNotificationAPIServiceAckNotificationParams, opts ...ClientOption) (*ActNotificationAPIServiceAckNotificationOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewActNotificationAPIServiceAckNotificationParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "ActNotificationApiService_AckNotification",
		Method:             "PUT",
		PathPattern:        "/api/v1/notification/ack/{notificationId}",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &ActNotificationAPIServiceAckNotificationReader{formats: a.formats},
		Context:            params.Context,
		Client:             params.HTTPClient,
	}
	for _, opt := range opts {
		opt(op)
	}

	result, err := a.transport.Submit(op)
	if err != nil {
		return nil, err
	}
	success, ok := result.(*ActNotificationAPIServiceAckNotificationOK)
	if ok {
		return success, nil
	}
	// unexpected success response
	unexpectedSuccess := result.(*ActNotificationAPIServiceAckNotificationDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}

/*
ActNotificationAPIServiceGetNotification act notification Api service get notification API
*/
func (a *Client) ActNotificationAPIServiceGetNotification(params *ActNotificationAPIServiceGetNotificationParams, opts ...ClientOption) (*ActNotificationAPIServiceGetNotificationOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewActNotificationAPIServiceGetNotificationParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "ActNotificationApiService_GetNotification",
		Method:             "GET",
		PathPattern:        "/api/v1/notification",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &ActNotificationAPIServiceGetNotificationReader{formats: a.formats},
		Context:            params.Context,
		Client:             params.HTTPClient,
	}
	for _, opt := range opts {
		opt(op)
	}

	result, err := a.transport.Submit(op)
	if err != nil {
		return nil, err
	}
	success, ok := result.(*ActNotificationAPIServiceGetNotificationOK)
	if ok {
		return success, nil
	}
	// unexpected success response
	unexpectedSuccess := result.(*ActNotificationAPIServiceGetNotificationDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}

/*
ActNotificationAPIServiceSendNotificationV1 act notification Api service send notification v1 API
*/
func (a *Client) ActNotificationAPIServiceSendNotificationV1(params *ActNotificationAPIServiceSendNotificationV1Params, opts ...ClientOption) (*ActNotificationAPIServiceSendNotificationV1OK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewActNotificationAPIServiceSendNotificationV1Params()
	}
	op := &runtime.ClientOperation{
		ID:                 "ActNotificationApiService_SendNotificationV1",
		Method:             "POST",
		PathPattern:        "/api/v1/notification",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &ActNotificationAPIServiceSendNotificationV1Reader{formats: a.formats},
		Context:            params.Context,
		Client:             params.HTTPClient,
	}
	for _, opt := range opts {
		opt(op)
	}

	result, err := a.transport.Submit(op)
	if err != nil {
		return nil, err
	}
	success, ok := result.(*ActNotificationAPIServiceSendNotificationV1OK)
	if ok {
		return success, nil
	}
	// unexpected success response
	unexpectedSuccess := result.(*ActNotificationAPIServiceSendNotificationV1Default)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}

/*
ActNotificationAPIServiceSubscribeNotification act notification Api service subscribe notification API
*/
func (a *Client) ActNotificationAPIServiceSubscribeNotification(params *ActNotificationAPIServiceSubscribeNotificationParams, opts ...ClientOption) (*ActNotificationAPIServiceSubscribeNotificationOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewActNotificationAPIServiceSubscribeNotificationParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "ActNotificationApiService_SubscribeNotification",
		Method:             "GET",
		PathPattern:        "/api/v1/notification/subscribe/{deviceId}",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &ActNotificationAPIServiceSubscribeNotificationReader{formats: a.formats},
		Context:            params.Context,
		Client:             params.HTTPClient,
	}
	for _, opt := range opts {
		opt(op)
	}

	result, err := a.transport.Submit(op)
	if err != nil {
		return nil, err
	}
	success, ok := result.(*ActNotificationAPIServiceSubscribeNotificationOK)
	if ok {
		return success, nil
	}
	// unexpected success response
	unexpectedSuccess := result.(*ActNotificationAPIServiceSubscribeNotificationDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}

// SetTransport changes the transport on the client
func (a *Client) SetTransport(transport runtime.ClientTransport) {
	a.transport = transport
}
